<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<!--<input type="text" id="text" value="" />
		<button  >确定</button>--><!--onclick="btnClick1()"-->
		<input type="button" id="" value="石头" />
		<input type="button" id="" value="剪刀" />
		<input type="button" id="" value="布" />
		<script src="/bck/static/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			/*var a=["石头","剪刀","布"];
			function btnClick1(){
				var tex = $("#text").val();
				var name = a[Math.floor(Math.random()*a.length)];
				if(tex=="石头"&&name=="剪刀"||tex=="剪刀"&&name=="布"||tex=="布"&&name=="石头"){
					alert(	tex+name+"=="+"你赢了");
				}
				if(tex=="剪刀"&&name=="石头"||tex=="布"&&name=="剪刀"||tex=="石头"&&name=="布"){
					alert(tex+name+"=="+"你输了");
				}
				if(tex==name){
					alert(tex+name+"=="+"平局");
				}
			}*/
			
			/*$(document).ready(function(){
				$("button").click(function(){
					 $.ajax({
			            type:"post",
			            url:"/ajax.php?ajax=shi",
			            data:{
			                te:$('#text').val()
			            },
			            success:function(mgs){
			                alert(mgs);
			            }
					});
				});*/
				$(function(){
					$("input").click(function(){
						var user = $(this).val();
						var computer=Math.floor(Math.random()*3);
						if(computer==0)computer="石头";
						else if(computer==1)computer="剪刀";
						else computer="布";
						
						/*if(user==computer) alert("平局");
						else if() alert("你赢了");
						else alert("电脑赢");*/
					});
				});
			
			
			
		</script>
	</body>
</html>
